/*
 * <Pezad Platformer>
 * Copyright 2008 Shayne Riley
 * 
 * This file is part of <Pezad Platformer>.
 * 
 * <Pezad Platformer> is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * <Pezad Platformer> is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with <Pezad Platformer>.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * To contact the authors on questions or issues regarding the license,
 * you may send an email to <shayner@gmail.com> or write to
 * Shayne Riley / P.O. Box 1092 / McCook, NE 69001.
 */

#ifndef DISPLAY_H_
#define DISPLAY_H_

#include "Graphics.h"
#include "ImageSDL.h"

namespace pzdDisplay
{

/**
 * @brief Provides the high-level graphics capabilities.
 * 
 * High-level graphics capabilities include loading and displaying level images,
 * actor images, special effects, and anything else that can relate to a
 * game idea and it being displayed.
 * 
 * This is the recommended interface to all things graphics related that other
 * sub-systems (At this point, the only other sub-system should be dealing with
 * is the logic sub-system) should use.  
 */
class Display
{
    public:
    	//! @brief Constructor for the display utilities.
        Display();

        //! @brief Destructor for a class that will not be derived.
        ~Display();

        //! @brief Renders the frame with all the visual objects specified. 
    	void doFrame();

    	/**
    	 * @brief Specifies the background to use for the game.
    	 * 
    	 * @param back	the image to use as a background.
    	 */
    	void setBackground(const ImageSDL * const back);

    	/**
    	 * @brief Specifies the sprite to use for the player's charcter.
    	 * 
    	 * @param actor	the image to use as the player.
    	 */
    	void setActor(const ImageSDL * const actor);

    	/**
    	 * @brief Reposition the actor to be in the position specified.
    	 * 
    	 * @param posX	the horizontal position of the actor
    	 * @param posY	the vertical position of the actor
    	 */
    	void setActorPos(int posX, int posY);
    private:

        //! No copying needed, do not allow. Copy ctor declared, not defined.
        Display(const Display& rhs);        
        //! No assignment needed. Do not define this function.
        Display& operator=(const Display rhs);
        //! No address-of needed. Do not define this function.
        Display* operator&();
        //! No const address-of needed. Do not define this function.
        const Display* operator&() const;
        
        // variables
    	//! The low-level portion that does all the graphics calculations.
        Graphics& gfx;
        //! Only used when initializing the instance of gfx.
        Graphics& getGraphics();

        //! The image that displays in the background.
        const ImageSDL * mBack;
        
        //! The image that represents the players avatar.
        const ImageSDL * mActor;

        int mActorPosX; //!< The position of the actor on screen.
        int mActorPosY; //!< The position of the actor on screen.
};

} // namespace

#endif /*DISPLAY_H_*/
